﻿using System.Diagnostics;
using Autofac.Builder;
using nPress.Core.Interfaces;
using nPress.Core.Repositories;
using NUnit.Framework;
using StructureMap;


namespace nPress.Tests.Ioc
{
    /// <summary>
    /// Summary description for AutoFacTest
    /// </summary>
    [TestFixture]
    public class AutoFacTest
    {
       
      
        [Test]
        public void TestConfiguration()
        {
            var builder = new ContainerBuilder();
            builder.Register<NHibernateRepository>().As<IRepository>();
            var container = builder.Build();
            var rep = container.Resolve<IRepository>();

            Assert.IsAssignableFrom(typeof(NHibernateRepository),rep);
        }



    }
}
